import 'package:flutter/material.dart';
import '../widgets/xpage.dart';
import '../utils/base.dart';
import 'styles.dart';

import 'homepage/coin_seller.dart';
import 'homepage/hot_icons.dart';

class Homepage extends StatefulWidget {
  Homepage({Key key}) : super(key: key);

  _HomepageState createState() => _HomepageState();
}

class _HomepageState extends State<Homepage> {
  //style:S
  TextStyle titleStyle() {
    return TextStyle(
        fontSize: Design.px(46),
        color: HexColor("333333"),
        decoration: TextDecoration.none);
  }
  //style:E

  @override
  Widget build(BuildContext context) {
    return XPage(
        appbar: HomepageAppBar(
            title: '欢迎使用酷酷宝收银系统',
            avatar:
                'http://wx4.sinaimg.cn/small/e927d912gy1g16242sqmzj21sc2ds4qq.jpg',
            nickname: '面包（12313）'),
        body: ListView(
          children: <Widget>[
            Container(
                padding: EdgeInsets.symmetric(horizontal: Design.px(42), vertical: Design.px(20)),
                child: Text('出售游戏币', style: titleStyle())),
            CoinSellerList(),
            HotIconList()
          ],
        ));
  }
}
